package com.balance.service.sys.impl;

import com.balance.mapper.sys.SysRoleMapper;
import com.balance.pojo.sys.SysRole;
import com.balance.service.sys.ISysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Title: SysRoleServiceImpl
 * @Author 小东
 * @Package com.balance.service.sys.impl
 * @Date 2025/3/28 13:47
 * @description: 权限服务层实现
 */
@Service
public class SysRoleServiceImpl implements ISysRoleService {

    @Autowired
    private SysRoleMapper sysRoleMapper;
    @Override
    public List<SysRole> selectRoleListWithMenus() {
        return sysRoleMapper.selectRoleListWithMenus();
    }

    @Transactional()
    @Override
    public int assignRoleMenus(Long roleId, List<Long> menuIds) {

        return sysRoleMapper.assignRoleMenus(roleId,menuIds);
    }
}
